package com.example.demo.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.entity.ChatRoom;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ChatRoomDao extends BaseMapper<ChatRoom> {
    @Select("select * from chat_room")
    List<ChatRoom> getAllChatRooms();

    @Select("select * from chat_room where id = #{id} limit 1")
    ChatRoom getChatRoomById(long id);
}
